"setup"
setwd("D:/CAV-Reduced")
AV = read.csv("AV.csv");
HV = read.csv("HV.csv");
par(mfrow=c(1,2))

"plot headway"
plot(AV$speedmph~AV$headft,
     xlab="Distance Headway (ft)",
     ylab="Speed (mph)", 
     main="AV Speed vs Distance Headway")

plot(HV$speedmph~HV$headft,
     xlab="Distance Headway (ft)",
     ylab="Speed (mph)", 
     main="HV Speed vs Distance Headway")

plot(AV$speedmph~AV$headft,
     xlab="Distance Headway (ft)",
     ylab="Speed (mph)", 
     main="AV Speed vs Distance Headway",
     ylim=c(25,80), xlim=c(0,1200))

plot(HV$speedmph~HV$headft,
     xlab="Distance Headway (ft)",
     ylab="Speed (mph)", 
     main="HV Speed vs Distance Headway",
     ylim=c(25,80), xlim=c(0,1200))

